<%@ page pageEncoding="UTF-8" contentType="text/html; charset=utf-8"  %>
<%
	System.out.println("starting save");		
/*	org.languageguide.user.User user = org.languageguide.user.UserManager.getUser(session);
	if (user == null){
		System.out.println("user not logged in");		
		return;
	}*/
	String id = request.getParameter("id");
//	String targetLanguage = request.getParameter("target");
	String text = request.getParameter("text");
	String type = request.getParameter("type");
	org.languageguide.readings.ReadingManager.saveDefinition(Integer.parseInt(id), text, type);
	System.out.println("saved");
	response.setContentType("text/xml");
	response.setHeader("Cache-Control", "no-cache");
	response.getWriter().write("<message>valid: yo Buddy</message>"); 
	

%>